import user from './modules/user'
import {createStore} from "vuex"
//  导入本地持久化存储依赖包
import createPersistedState from 'vuex-persistedstate'
const vuexPersisted = new createPersistedState({
	key: 'app_vuex_data',
	storage:{
		getItem:key=>uni.getStorageSync(key),
		setItem: (key, value) => uni.setStorageSync(key,value),
		removeItem:key=>uni.removeStorageSync(key)
	}
})
const store=createStore({
	plugins:[vuexPersisted],
	modules:{
		user
	}
})
export default store